import Layout from '@/layout'

const customerRouter = {
  path: '/customer',
  component: Layout,
  redirect: '/customer/list',
  name: 'customer',
  meta: {
    title: '客户管理',
    icon: '账户管理'
  },
  children: [
    {
      path: 'list',
      component: () => import('@/views/customer/list'),
      name: 'customerList',
      meta: { title: '客户列表', noCache: true, icon: '商户管理' }
    },
    {
      path: 'visit',
      hidden: true,
      component: () => import('@/views/customer/visit'),
      name: 'customerVisit',
      meta: { title: '拜访记录', noCache: true, icon: '商户管理' }
    },
    {
      path: 'signIn',
      component: () => import('@/views/customer/signIn'),
      name: 'customerSignIn',
      meta: { title: '签到管理', noCache: true, icon: '商户管理' }
    },
    {
      path: 'type',
      redirect: '/customer/type/list',
      component: () => import('@/views/customer/type'),
      name: 'customerType',
      meta: { title: '客户类型', noCache: true, icon: '商户管理' },
      children: [
        {
          path: 'list',
          component: () => import('@/views/customer/type/list'),
          name: 'customerTypeList',
          meta: { title: '客户类型', noCache: true, icon: '商户管理' }
        },
        {
          hidden: true,
          path: 'childrenMenu',
          component: () => import('@/views/customer/type/childrenMenu'),
          name: 'customerChildrenMenu',
          meta: { title: '二级菜单', noCache: true, icon: '商户管理' }
        }
      ]
    },
    {
      path: 'classification',
      component: () => import('@/views/customer/classification'),
      name: 'customerClassification',
      meta: { title: '客户分类', noCache: true, icon: '商户管理' }
    },
    {
      path: 'cooperation',
      component: () => import('@/views/customer/cooperation'),
      name: 'customerCooperation',
      meta: { title: '合作状态', noCache: true, icon: '商户管理' }
    },
    {
      path: 'visited',
      component: () => import('@/views/customer/visitedRecords'),
      name: 'Visited',
      meta: { title: '拜访记录', noCache: true, icon: '商户管理' }
    }
  ]
}
export default customerRouter
